package person.bing.fbcloud.brushQuestions.singleton;

/**
 * 双重校验模式
 *
 * @author: mengfanbing
 * @date: 2020/5/26 17:09
 */
public class DoubleLockMode {
    private static volatile DoubleLockMode doubleLockMode;
    private DoubleLockMode(){}

    public static DoubleLockMode getInstance(){
        if (doubleLockMode == null){
            synchronized(DoubleLockMode.class){
                if (doubleLockMode == null){
                    doubleLockMode = new DoubleLockMode();
                }
            }
        }
        return doubleLockMode;
    }
}
